package ipebg.mzk.facade.system.service;

import ipebg.mzk.common.util.Page;
import ipebg.mzk.facade.entity.MsAdminUser;
import ipebg.mzk.facade.system.bean.AdminUserBean;

import java.util.List;


public interface UserService {

	
	List<MsAdminUser> findAllUser() throws Exception ;
	
	/**
	 * 獲取用户List
	 * @param user
	 * @param from
	 * @param length
	 * @return
	 * @throws Exception
	 */
	Page getAllList(MsAdminUser user ,int from, int length) throws Exception ;
	
	/**
	 * 將實體List轉變為beanList
	 * @param userList
	 * @return
	 * @throws Exception
	 */
	List<AdminUserBean> toBean(List<MsAdminUser> userList) throws Exception;	
	
	/**
	 * 保存or修改User對象
	 * @param user
	 */
	void saveOrUpdate(MsAdminUser user);

	/**
	 * 根據Id刪除用戶對象
	 * @param userId
	 * @return
	 * @throws Exception
	 */
	boolean delete(String userId) throws Exception;
	
	/**
	 * 根據userId查找User對象
	 * @param userId
	 * @return
	 */
	MsAdminUser findUserById(String userId);
	
	/**
	 * 根據工號查找User對象
	 * @param no
	 * @return
	 */
	MsAdminUser findUserByEmpNo(String no);

	String getMail(String empNo);
	

	
	MsAdminUser getEnableUserByName(String userName);
}
